<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>字典维护</title>
    <meta name="menu" content="codeManage"/>

    <script type="text/javascript">
        $(document).ready(function() {
            $("#filter_EQL_codeType_id").change(function() {
                searchPage();
            });

            $("#addCodeButton").click(function(){
                $("#mainForm").attr("action","code!input.action");
                $("#mainForm").submit();
            })
        })
    </script>
</head>

<body>
<div class="content_block">
    <h2 class="jquery_tab_title">字典维护</h2>

    <form id="mainForm" action="code.action" method="get">
        <p>
        <label class="inline">电码类型:</label>
        <select id="filter_EQL_codeType_id" name="filter_EQL_codeType.id" class="input-small">
            <option value=''>选择 </option>
            <s:iterator var="codeType" value="codeTypeList">
                <option value="<s:property value="#codeType.id"/>"
                        <c:if test="${codeType.id==param['filter_EQL_codeType.id']}">selected</c:if> >
                    <s:property value="#codeType.shortDesc"/>
                </option>
            </s:iterator>
        </select>
         </p>
        <table width="100%" cellpadding="0" id="table_liquid" cellspacing="0">
            <thead>
            <tr>
                <th><a href="javascript:sort('codeType.shortDesc','asc')">代码类型</a></th>
                <th><a href="javascript:sort('value','asc')">代码值</a></th>
                <th><a href="javascript:sort('code','asc')">代码</a></th>
                <th><a href="javascript:sort('shortDesc','asc')">描述</a></th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <s:iterator value="page.result">
                <tr>
                    <td>${codeType.shortDesc}&nbsp;</td>
                    <td>${value}&nbsp;</td>
                    <td>${code}&nbsp;</td>
                    <td>${shortDesc}&nbsp;</td>
                    <td width="90">
                        <a href="code!input.action?id=${id}" class="edit_icon" title="修改">修改</a>
                        <a href="code!delete.action?id=${id}" class="delete_link" title="删除">删除</a>
                    </td>
                </tr>
            </s:iterator>
            <tr>
                <td colspan="2" class="tdButton">
                    <a  class="button" id="addCodeButton">增加字典</a>
                </td>
                <td colspan="3" class="pagination">
                    <%@ include file="/common/pagination.jsp" %>
                </td>
            </tr>
            </tbody>
        </table>

    </form>
</div>
</body>
</html>
